﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Windows.Design;

namespace Okazuki.BehaviorSupport.Design.Commons
{
    public class AssemblyReferencesTypeResolver
    {
        private AssemblyReferences assemblyReferences;

        public AssemblyReferencesTypeResolver(AssemblyReferences assemblyReferences)
        {
            if (assemblyReferences == null)
            {
                throw new ArgumentNullException("assemblyReferences");
            }
            this.assemblyReferences = assemblyReferences;
        }

        public IEnumerable<Type> ResolveInheritTypes(Type type)
        {
            return this.assemblyReferences.GetTypesHasDefaultConstructor(type);
        }
    }
}
